//Sunday, November 01 2009
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class FallingPoints
{
public:
	vector <double> getHeights(vector <int> X, int R)
	{
		vector<double> y;
		double r = 1.0 * R * R;
		y.push_back(0.0);
		for(int i=0; i+1<X.size(); i++)
		{
			double xx = fabs(X[i+1] - X[i]);
			if(1.0*xx == R) y.push_back(1.0*y[i]);
			else if(xx > R) y.push_back(0.0);
			else
			{
				double yy = sqrt(r - xx*xx);
				//if(yy > y[i])
				y.push_back(1.0*y[i] + yy);
				//else y.push_back(1.0*y[i] - yy);
			}
		}
		return y;
	}
};
